Repository navigation
Harden private context and customer inbox boundaries - #126
Conversation
There was a problem hiding this comment.
Devin Review found 2 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| const box = inboxDir(eng) | ||
| try { fs.mkdirSync(box, { recursive: true }) } catch (e) { failFs(e, 'create inbox', box) } | ||
| try { | ||
| if (!checkedInbox(eng)) fs.mkdirSync(box) |
There was a problem hiding this comment.
🟡 Concurrent first inbox stage fails
Two first-time ingest stage calls can both find no inbox, then one mkdirSync fails with EEXIST. One valid staging request is lost.
| if (!checkedInbox(eng)) fs.mkdirSync(box) | |
| if (!checkedInbox(eng)) fs.mkdirSync(box, { recursive: true }) |
Was this helpful? React with 👍 or 👎 to provide feedback.
| const before = readEng(eng, file) | ||
| if (removesMarker(before)) throw new Error('redact refused: privacy delimiter changed during review') |
There was a problem hiding this comment.
🟡 Delimiter race leaves partial redaction
A later file gaining a matching delimiter makes removesMarker throw after earlier files were rewritten. Redaction exits with only some matches removed.
Learn more
Redaction validates all files before writing, but the validation does not hold their locks. The command then locks and rewrites files one at a time. A cooperating writer can change a later file after preflight, causing the new in-lock delimiter check to throw after earlier rewrites. The command has no rollback around this loop.
Example: REMOVE_ME appears in decisions.md and context.md. After preflight, another process changes the matching context line to <private data-note="REMOVE_ME">. The command rewrites decisions.md, rejects context.md, and exits without committing a complete redaction.
Recommended fix: Acquire all touched-file locks in deterministic order before revalidating or writing. Snapshot every file, validate all snapshots, then write them; restore written snapshots if any write fails.
Was this helpful? React with 👍 or 👎 to provide feedback.
Prepared outputs could expose private text through malformed markers, redaction previews or inbox metadata. Inbox IDs could also escape the active customer's staged notes. This release seals those paths and adds synthetic regression coverage.
Scoped independent review findings were fixed and reproduced through CLI tests. Focused privacy/inbox tests pass (38). Full release checks pass: 422 tests, no failures or skips. Package contents checked for private task/session artifacts. Website copy is handled separately in fdeops-web PR #17.
These controls apply to FDEOps-prepared paths. They do not sandbox the AI host or establish regulatory certification.